package be.rivendale.renderer.mk2.window;

import be.rivendale.renderer.mk2.Consumer;
import be.rivendale.renderer.mk2.data.RenderContext;
import be.rivendale.renderer.mk2.data.Segment;

public class WindowConsumer implements Consumer {
    private Window window;

    @Override
    public void onConsumerStarted() {
        window = new Window(RenderContext.getInstance().getRenderInformation().getHorizontalCameraResolution(), RenderContext.getInstance().getRenderInformation().getVerticalCameraResolution());
        window.setVisible(true);
    }

    @Override
    public void onSegmentComplete(Segment segment) {
        window.blit(segment);
    }
}
